home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group03a.txt / 000042_icon-group-sender_Mon Mar 24 13:01:08 2003.msg < prev    next >
Internet Message Format  |  2003-12-22  |  1KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2OJxR229625
  4.     for icon-group-addresses; Mon, 24 Mar 2003 12:59:27 -0700 (MST)
  5. Message-Id: <200303241959.h2OJxR229625@baskerville.CS.Arizona.EDU>
  6. Date: Mon, 24 Mar 2003 12:16:40 -0500
  7. From: "Steve Graham" <Steve_Graham@labcorp.com>
  8. To: <icon-group@cs.arizona.edu>
  9. Subject: Re: Sockets in Icon/Unicon
  10. Content-Disposition: inline
  11. X-MIME-Autoconverted: from quoted-printable to 8bit by baskerville.CS.Arizona.EDU id h2OHH4D25140
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13. Status: RO
  14.  
  15. Many thanks to all those who offered help.  The server program works like a champ now.
  16.  
  17.  
  18. Steve
  19.  
  20. >>> "Steve Graham" <Steve_Graham@labcorp.com> 03/20/03 06:29PM >>>
  21. I have a server program written in Unicon and a client one.  While the server does not abort (not sure if it works yet), the client aborts because it cannot open the port.  Can't figure out why.
  22.  
  23. Both are running on an Intel/Win98 box.  The programs are reproduced below.
  24.  
  25. Any help would be appreciated.
  26.  
  27.  
  28. Steve
  29.  
  30. ===
  31.  
  32. Client:
  33. procedure main()
  34. f := open(":1026","n") | stop("Unable to open port 1026")
  35. every write(f,1 to 4,"\n")
  36. close(f)
  37. end
  38.  
  39. Server:
  40. procedure main()
  41.    port := 1026
  42.    write("Server Test")
  43.    while net := open(":" || port,"na") do write(read(net))
  44.    close(net)
  45.    (&errno = 0) | stop("Error: ",&errortext)
  46. end
  47.  
  48.  
  49.  
  50.  
  51.  
  52.